package queuedemo;

import java.util.Deque;
import java.util.LinkedList;

public class Test {
    public static void main1(String[] args) {
        MyLinkQueue myLinkQueue = new MyLinkQueue();
        myLinkQueue.offer(1);
        myLinkQueue.offer(2);
        myLinkQueue.offer(3);
        myLinkQueue.offer(4);

        System.out.println(myLinkQueue.poll());
        System.out.println(myLinkQueue.poll());
        System.out.println(myLinkQueue.poll());
        System.out.println(myLinkQueue.poll() );
    }

    public static void main(String[] args) {
        Deque<Integer> deque = new LinkedList<>();
        deque.offer(1);
        deque.offer(2);
        deque.offer(3);
        deque.addFirst(1);
        deque.push(9);
        deque.offer(99);
        System.out.println(deque);
        System.out.println(deque.pop());
    }
}




